package com.io;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
@SuppressWarnings("all")
public class IoUtils {
	
	public static void main(String[] args) throws Exception {
		File file = new File("a.txt");
		//FileReader fd = new FileReader(file);
		//FileWriter fw = new FileWriter(file);
		FileInputStream fis = new FileInputStream(file);
		FileOutputStream fos = new FileOutputStream(file);
		//BufferedInputStream 
		//FileInputStream
		byte[] b1 = new byte[1024];
		int length = 0;
		while( (length = fis.read(b1)) != -1){
			fos.write(b1, 0, length);
		}
	}
}
